/******************************************************************************
 * (C) Copyright 2015 Atech-Automotive
 * FILE NAME:    drv_canCbk.c
 * DESCRIPTION:
 * 
 * DATE BEGUN:   2015/06/10
 * BY:           martin.zhang
 * PRODUCT NAME:
 * APPLICATION:
 * TARGET H/W:
 * DOC REF:
 *****************************************************************************
 */

/*****************************************************************************
** #include 
*****************************************************************************/
#include "drv_canCbk.h"
#include "drv_can.h"
#include "app_canNwm.h"
#include "msg_canType.h"

/******************************************************************************/
/**
 * Function Name: drv_canCallBackRxOk
 * Description: 
 *
 * Param:   none
 * Return:  none
 * _____________________________________________________________________________
 *     Date             Changes Description                Author
 *  06/10/2015                draft                     martin.Zhang
 ******************************************************************************/
void drv_canCbk_v_rxOk(void)
{
    notifyCanNwm(CMD_CAN_NWM_RECEIVED);
}


/******************************************************************************/
/**
 * Function Name: drv_canCbkRxErr
 * Description: none
 *
 * Param:   none
 * Return:  none
 * _____________________________________________________________________________
 *     Date             Changes Description                Author
 *  06/10/2015                draft                     martin.Zhang
 ******************************************************************************/
void drv_canCbk_v_rxErr(void)
{
}


/******************************************************************************/
/**
 * Function Name: drv_canCbkErr
 * Description: none
 *
 * Param:   none
 * Return:  none
 * _____________________________________________________________________________
 *     Date             Changes Description                Author
 *  06/10/2015                draft                     martin.Zhang
 ******************************************************************************/
void drv_canCbk_v_err(void)
{
    if(drv_can_e_getBusStatus() == CAN_BUS_BUSOFF)
    {
        notifyCanNwm(CMD_CAN_NWM_BUS_OFF);
    }
}


/******************************************************************************/
/**
 * Function Name: drv_canCbkWakeUp
 * Description: none
 *
 * Param:   none
 * Return:  none
 * _____________________________________________________________________________
 *     Date             Changes Description                Author
 *  06/10/2015                draft                     martin.Zhang
 ******************************************************************************/
void drv_canCbk_v_wakeUp(void)
{
    notifyCanNwm(CMD_CAN_NWM_WAKE_UP);
}

/*****************************************************************************
** End File
*****************************************************************************/

